package com.example._01helloword.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

//@Controller//需要返回视图
@RestController//不会调用视图，代表都是字符串或json输出   @RestController=@Controller+@ResponseBody
public class HelloController {

    @RequestMapping("/hello")
    public String hello(){
        return "hello world";
    }
}
